# https://www.gying.org/


import requests
import re
import json


session = requests.Session()

login_url = 'https://www.gying.org/user/login'

session.post(login_url, data={
    'siteid':1,
    'dosubmit':1,
    "cookietime":10506240,
    "username":"zzy0371",
    "password":"Qikuedu123"
})

# print(response.cookies)

response = session.get('https://www.gying.org/user/favorite')

data = re.search(r'_obj.inlist=(.*?);', response.text)
if data:
    data = data.group(1)
    data = json.loads(data)
    titles = data['t']
    images = data['i']

    for i, t in enumerate(titles):
        print(t, f'https://s.tutu.pm/img/mv/{images[i]}/384.avif')


